const wx2my = require('../../../wx2my');
const Behavior = require('../../../Behavior');
var app = getApp();
Page({
  data: {
    hotel: []
  },
  onLoad: function (o) {
    wx2my.setNavigationBarColor({
      frontColor: '#000000',
      backgroundColor: '#ffffff'
    });
  },
  search_hotel: function (o) {
    console.log(o);
    var t = this,
        e = o.detail.value;
    "" != e ? app.util.request({
      url: "entry/wxapp/JdList",
      cachetime: "0",
      data: {
        keywords: e
      },
      success: function (o) {
        console.log(o), t.setData({
          hotel: o.data
        });
      }
    }) : t.setData({
      hotel: []
    });
  },
  search_result: function (o) {
    var t = o.currentTarget.dataset.id;
    wx2my.navigateTo({
      url: "../hotel_list/hotel_info?hotel_id=" + t
    });
  },
  onReady: function () {},
  onShow: function () {},
  onHide: function () {
    this.setData({
      hotel: []
    });
  },
  onUnload: function () {},
  onPullDownRefresh: function () {},
  onReachBottom: function () {}
});